<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        //创建对象new Object()
        // {}
        // var obj1 = new Object() //创建一个空对象
        // var obj2 = {}
        // console.log(obj1,obj2); //空对象
        

        var yy = {}
        yy.name = '张三'
        yy['age'] = 18
        yy.hobby = function () {
            console.log('吃饭睡觉打豆豆')
        }
        console.log(yy)
    </script>
</body>
</html>